import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/Annotate",
    name: "Annotate",
    component: () =>
      import(/* webpackChunkName: "Annotate" */ "../views/Annotate.vue"),
  },
  {
    path: "/about",
    name: "about",
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
  },
  {
    path: "/pageA",
    name: "pageA",
    component: () =>
      import(/* webpackChunkName: "pageA" */ "../views/breadcrumb/page-a.vue"),
    meta: {
      title: "页面A",
    },
    children: [
      {
        path: "/pageB",
        name: "pageB",
        component: () =>
          import(
            /* webpackChunkName: "pageB" */ "../views/breadcrumb/page-b.vue"
          ),
        meta: {
          title: "页面B",
        },
        children: [
          {
            path: "/pageC",
            name: "pageC",
            component: () =>
              import(
                /* webpackChunkName: "pageC" */ "../views/breadcrumb/page-c.vue"
              ),
            meta: {
              title: "页面C",
            },
            children: [
              {
                path: "/pageD",
                name: "pageD",
                component: () =>
                  import(
                    /* webpackChunkName: "pageD" */ "../views/breadcrumb/page-d.vue"
                  ),
                meta: {
                  title: "页面D",
                },
              },
            ],
          },
        ],
      },
    ],
  },
  // {
  //   path: "/demo",
  //   name: "demo",
  //   component: () =>
  //     import(/* webpackChunkName: "DemoPage" */ "../views/DemoPage.vue"),
  // },
  // {
  //   path: "/dag",
  //   name: "dag",
  //   component: () =>
  //     import(/* webpackChunkName: "DagPage" */ "../views/dag/DagPage.vue"),
  // },
  // {
  //   path: "/tree",
  //   name: "tree",
  //   component: () =>
  //     import(/* webpackChunkName: "treePage" */ "../views/treePage.vue"),
  // },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
